package com.zhuiyun.educations.api.newCourse.mapper;

import com.zhuiyun.educations.api.newCourse.entity.UnitJoint;
import com.zhuiyun.educations.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * @ClassName UnitJointMapper
 * @Description TODO 章节详细课程持久层
 * @Author 杨友朋
 * @Date 2023/6/28 16:54
 **/
@Mapper
public interface UnitJointMapper extends BaseMapper<UnitJoint> {
    @Update("update unit_joint set del_flag=1 where id=#{id}")
    Integer delOneById(Integer id);

    @Update("update unit_joint set joint_status=#{jointStatus},update_time=#{updateTime} where id=#{id}")
    Integer upSwitch(UnitJoint unitJoint);

    @Update("update unit_joint set " +
            "joint_title=#{jointTitle},joint_introduction=#{jointIntroduction},video_id=#{videoId},update_time=#{updateTime} where id=#{id}")
    int upJoint(UnitJoint unitJoint);
}
